﻿<phone:PhoneApplicationPage 
    x:Class="Wulong.Phone.Qiushi.Views.NewPostView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:c4f="clr-namespace:Coding4Fun.Phone.Controls;assembly=Coding4Fun.Phone.Controls" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" 
    Style="{StaticResource TransitionPageStyle}">

    <phone:PhoneApplicationPage.Resources>
        
    </phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28" Orientation="Vertical">
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Path=AppI18N.App_Title, Source={StaticResource ls}}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="{Binding Path=AppI18N.V_NewPost_Title, Source={StaticResource ls}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel>
                <TextBlock Text="{Binding Path=AppI18N.V_NewPost_Body_Lable, Source={StaticResource ls}}" />
                <TextBox Width="380" Text="{Binding Body, Mode=TwoWay}" Height="120" />
                <TextBlock Text="{Binding Path=AppI18N.V_NewPost_Tags_Lable, Source={StaticResource ls}}" />
                <TextBox Width="380" Text="{Binding Tags, Mode=TwoWay}" />
                <StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
                        <StackPanel>
                            <c4f:RoundButton ImageSource="/images/picstory.png"  x:Name="LaunchPhotoChooser" Content="{Binding Path=AppI18N.V_NewPost_LauchPhotoChooser_Button, Source={StaticResource ls}}"/>
                            <c4f:RoundButton ImageSource="/images/camera.png" x:Name="LaunchCamera" Content="{Binding Path=AppI18N.V_NewPost_LauchCamera_Button, Source={StaticResource ls}}"/>
                            <c4f:RoundButton  ImageSource="/images/removepic.png" x:Name="RemovePic" Content="{Binding Path=AppI18N.V_NewPost_RemovePicture_Button, Source={StaticResource ls}}"/>
                        </StackPanel>
                        <Image Width="160" Height="120" Source="{Binding PictureSource}"/>
                        
                        <StackPanel>
                            <toolkit:ToggleSwitch IsChecked="{Binding IsCommentAllowed, Mode=TwoWay}" Header="{Binding Path=AppI18N.V_NewPost_IsCommentAllowed_Switch, Source={StaticResource ls}}"/>
                            <toolkit:ToggleSwitch IsChecked="{Binding IsAnonymous, Mode=TwoWay}" Header="{Binding Path=AppI18N.V_NewPost_IsAnonymous_Switch, Source={StaticResource ls}}"/>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
